
//^ -------------------- Jquery Extensions ------------------//
(function ($) {
    jQuery.fn.extend({
        InputCurrency: function (opts) {
            opts = jQuery.extend({ }, opts || {});
            return this.each(function () {
                var _self = this;
                var _this = $(this);

                _this.css({ "text-align": "right", "ime-mode": "disabled" });

                _this.keypress(function (e) {
                    var _value = _self.value;
                    var _key = window.event ? e.keyCode : e.which;
                    var _keyValue = String.fromCharCode(_key);
                    if (_value.split(".").length - 1 == 1) {
                        if (!/^[\d]$/.test(_keyValue)) {
                            return false;
                        }
                    }
                    else {
                        if (!/^[\d\.]$/.test(_keyValue)) {
                            return false;
                        }
                    }
                });

            });
        }
    });
})(jQuery);
//$ -------------------- Jquery Extensions ------------------//